package com.iqiyi.controller;

import com.iqiyi.dto.ActionResult;
import com.iqiyi.mapper.ActorMapper;
import com.iqiyi.po.Actor;
import com.iqiyi.service.ActorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TODO
 *
 * @author YoungKai
 * @date 2021/2/24 11:22
 */
@RestController
@RequestMapping("/actor")
public class ActorController {
    @Autowired(required = false)
    private ActorService actorService;
    @RequestMapping(value = "/findActorByVid",method = RequestMethod.GET)
    public ActionResult findActorByVid(int vid){
        List<Actor> actorByVid = actorService.findActorByVid(vid);
        return new ActionResult(200,"find success!",actorByVid);
    }
}
